package com.ruicar.afs.cloud.manage.mq.sender;

import com.ruicar.afs.cloud.common.mq.finance.corporate.dto.GeneraSuccessDto;
import com.ruicar.afs.cloud.common.mq.rabbit.anno.send.AfsRabbitMqClient;
import com.ruicar.afs.cloud.common.mq.rabbit.anno.send.AfsRabbitMqSender;
import com.ruicar.afs.cloud.common.mq.rabbit.message.AfsTransEntity;
import com.ruicar.afs.cloud.manage.mq.fallback.SendContractInfoSuccessFallBack;

/**
 * <p>Description: </p>
 *
 * @author ZC.GUO
 * @version 1.0
 * @date create on 2020-07-20 11:16
 */
@AfsRabbitMqClient
public interface ManageSender {

    /**
     * 银行到账生成凭证
     * @author ZC.GUO
     * @param entity 发送数据封装
     * @return
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAlia}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeName}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueName.contractManageToFinance}")
    void sendGeneraSuccessDataToFinance(AfsTransEntity<GeneraSuccessDto> entity );

    /**定时发送还款日变更数据
     * @author yaorui.zhang
     * @param entity
     */
    @AfsRabbitMqSender(serverAlias = "${com.ruicar.afs.cloud.rabbitQueue.serverAliaAcs}"
            ,exchangeName = "${com.ruicar.afs.cloud.rabbitQueue.exchangeNameAcs}"
            ,queueName = "${com.ruicar.afs.cloud.rabbitQueue.queueNameAcs.yjdpWaibaoAsyncDuedatechange}"
            ,enableOn = "${com.ruicar.afs.cloud.rabbitQueue.exchangeNameAcs}"
            ,fallBack = SendContractInfoSuccessFallBack.class)
    void sendDuedatechange(String entity);

}
